CMAKE_MINIMUM_REQUIRED(VERSION 3.16)
project(examples)
if(NOT DEFINED ENV{MACA_PATH})
    message(FATAL_ERROR "not defined environment variable: MACA_PATH")
endif()

if (DEFINED ENV{MACA_CLANG_PATH})
    INCLUDE_DIRECTORIES($ENV{MACA_CLANG_PATH}/../lib)
else()
    message(FATAL_ERROR "\nthe env MACA_CLANG_PATH is not specified!")
endif()

INCLUDE_DIRECTORIES($ENV{MACA_PATH}/include/)
INCLUDE_DIRECTORIES($ENV{MACA_PATH}/include/mcfft/)
INCLUDE_DIRECTORIES($ENV{MACA_PATH}/include/mcr/)
INCLUDE_DIRECTORIES($ENV{MACA_PATH}/include/common/)
LINK_DIRECTORIES($ENV{MACA_PATH}/lib)
set( sample_list
   complex_1d
   complex_2d
   complex_3d
   real2complex_1d
   real2complex_2d
   real2complex_3d
   )

foreach( sample ${sample_list} )
	add_executable(mcfft_${sample} ${sample}.cpp)
	target_link_libraries(mcfft_${sample} mcfft mcruntime)
endforeach()
